package top.hcode.hoj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.hcode.hoj.pojo.entity.course.CourseSection;

@Mapper
@Repository
public interface CourseSectionMapper extends BaseMapper<CourseSection> {

    @Select("select max(sort_order) from course_section where course_id = #{courseId}")
    Integer getMaxSortOrder(@Param("courseId") Long courseId);
}
